package jl.cts.util;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory.Options;

public class Util {

	public static Bitmap decodeBitmap(Resources resources, int resourceId) {
		Bitmap bmp = null;
		Options options = new Options();
		options.inPurgeable = true;
		options.inDither = false;
		options.inJustDecodeBounds = false;
		options.inSampleSize = 1;
		options.mCancel = false;
		// options.inPreferredConfig = Bitmap.Config.RGB_565;
		bmp = BitmapFactory.decodeResource(resources, resourceId, options);
		return bmp;
	}

}
